<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div>
    {{ data }}
  </div>
</template>

<script setup lang="ts">
  // 获取提问内容
  import { ref } from "vue";
  import { useRoute } from 'vue-router'
  const data = ref<string>('')
  const {query:{v:queryText}} = useRoute();

  // 发起请求
  import { fetchStream } from "@/utils/Fetch";
  if (typeof queryText === 'string') {
    fetchStream(queryText, val=>{
      console.log(val)
      data.value += val
    })
  }
</script>

<style lang="scss" scoped>

</style>
